<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Git个人使用 | Element</title><meta name="keywords" content="Git"><meta name="author" content="FHang"><meta name="copyright" content="FHang"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="description" content="Git个人使用1234&#x2F;&#x2F; 2021-02-19：苦于还是不记得git bash的使用，每次使用都要到网上找一会，太麻烦了，决定写成博客，记录一下个人的使用总结&#x2F;&#x2F; 开头从最开始的顺序来记录-------------------------------------------------------------------------------------">
<meta property="og:type" content="article">
<meta property="og:title" content="Git个人使用">
<meta property="og:url" content="https://fhangh.gitee.io/article/2bb94fc8.html">
<meta property="og:site_name" content="Element">
<meta property="og:description" content="Git个人使用1234&#x2F;&#x2F; 2021-02-19：苦于还是不记得git bash的使用，每次使用都要到网上找一会，太麻烦了，决定写成博客，记录一下个人的使用总结&#x2F;&#x2F; 开头从最开始的顺序来记录-------------------------------------------------------------------------------------">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_12.jpg">
<meta property="article:published_time" content="2021-02-19T11:49:40.549Z">
<meta property="article:modified_time" content="2021-04-21T08:57:08.723Z">
<meta property="article:author" content="FHang">
<meta property="article:tag" content="Git">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_12.jpg"><link rel="shortcut icon" href="/fhangh/img/fh.png"><link rel="canonical" href="https://fhangh.gitee.io/article/2bb94fc8"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="yandex-verification" content="{&quot;theme_color&quot;:{&quot;enable&quot;:true,&quot;main&quot;:&quot;#49B1F5&quot;,&quot;paginator&quot;:&quot;#00c4b6&quot;,&quot;button_hover&quot;:&quot;#FF7242&quot;,&quot;text_selection&quot;:&quot;#00c4b6&quot;,&quot;link_color&quot;:&quot;#99a9bf&quot;,&quot;meta_color&quot;:&quot;#858585&quot;,&quot;hr_color&quot;:&quot;#A4D8FA&quot;,&quot;code_foreground&quot;:&quot;#F47466&quot;,&quot;code_background&quot;:&quot;rgba(27, 31, 35, .05)&quot;,&quot;toc_color&quot;:&quot;#00c4b6&quot;,&quot;blockquote_padding_color&quot;:&quot;#49b1f5&quot;,&quot;blockquote_background_color&quot;:&quot;#49b1f5&quot;}}"/><link rel="stylesheet" href="/fhangh/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css"><script>var GLOBAL_CONFIG = { 
  root: '/fhangh/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  ClickShowText: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"top-right"},
  justifiedGallery: {
    js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
    css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: false
};

var saveToLocal = {
  set: function setWithExpiry(key, value, ttl) {
    const now = new Date()
    const expiryDay = ttl * 86400000
    const item = {
      value: value,
      expiry: now.getTime() + expiryDay,
    }
    localStorage.setItem(key, JSON.stringify(item))
  },

  get: function getWithExpiry(key) {
    const itemStr = localStorage.getItem(key)

    if (!itemStr) {
      return undefined
    }
    const item = JSON.parse(itemStr)
    const now = new Date()

    if (now.getTime() > item.expiry) {
      localStorage.removeItem(key)
      return undefined
    }
    return item.value
  }
}</script><script id="config_change">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-04-21 16:57:08'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(function () {  window.activateDarkMode = function () {
    document.documentElement.setAttribute('data-theme', 'dark')
    if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
    }
  }
  window.activateLightMode = function () {
    document.documentElement.setAttribute('data-theme', 'light')
   if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
    }
  }
  const autoChangeMode = 'false'
  const t = saveToLocal.get('theme')
  if (autoChangeMode === '1') {
    const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
    const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
    const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
    const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
    if (t === undefined) {
      if (isLightMode) activateLightMode()
      else if (isDarkMode) activateDarkMode()
      else if (isNotSpecified || hasNoSupport) {
        const now = new Date()
        const hour = now.getHours()
        const isNight = hour <= 6 || hour >= 18
        isNight ? activateDarkMode() : activateLightMode()
      }
      window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
        if (saveToLocal.get('theme') === undefined) {
          e.matches ? activateDarkMode() : activateLightMode()
        }
      })
    } else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else if (autoChangeMode === '2') {
    const now = new Date()
    const hour = now.getHours()
    const isNight = hour <= 6 || hour >= 18
    if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
    else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else {
    if (t === 'dark') activateDarkMode()
    else if (t === 'light') activateLightMode()
  }const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
   if (asideStatus === 'hide') {
     document.documentElement.classList.add('hide-aside')
   } else {
     document.documentElement.classList.remove('hide-aside')
   }
}})()</script><meta name="generator" content="Hexo 5.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" data-lazy-src="/fhangh/img/fh.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/archives/"><div class="headline">文章</div><div class="length-num">26</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/tags/"><div class="headline">标签</div><div class="length-num">10</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/fhangh/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/fhangh/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page" href="/fhangh/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li><li><a class="site-page" href="/fhangh/Gallery/"><i class="fa-fw fas fa-images"></i><span> Image</span></a></li></ul></div></div></div></div><div id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url(https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img/postImg_12.jpg)"><nav id="nav"><span id="blog_name"><a id="site-name" href="/fhangh/">Element</a></span><span id="menus"><div id="search_button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/fhangh/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/fhangh/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page" href="/fhangh/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li><li><a class="site-page" href="/fhangh/Gallery/"><i class="fa-fw fas fa-images"></i><span> Image</span></a></li></ul></div></div><span class="close" id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></span></span></nav><div id="post-info"><h1 class="post-title">Git个人使用</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-02-19T11:49:40.549Z" title="发表于 2021-02-19 19:49:40">2021-02-19</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-04-21T08:57:08.723Z" title="更新于 2021-04-21 16:57:08">2021-04-21</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/fhangh/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="meta-secondline"> <span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">2.7k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>14分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="Git个人使用"><a href="#Git个人使用" class="headerlink" title="Git个人使用"></a>Git个人使用</h1><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F; 2021-02-19：苦于还是不记得git bash的使用，每次使用都要到网上找一会，太麻烦了，决定写成博客，记录一下个人的使用总结</span><br><span class="line">&#x2F;&#x2F; 开头从最开始的顺序来记录</span><br><span class="line">-----------------------------------------------------------------------------------------------------------------------</span><br><span class="line">&#x2F;&#x2F; 2021-02-20：又添加了 clone 的方法，修改完善了之前的内容</span><br></pre></td></tr></table></figure>
<h3 id="1-准备工作"><a href="#1-准备工作" class="headerlink" title="1. 准备工作"></a>1. 准备工作</h3><p>简单带过：</p>
<ul>
<li>注册Github账号</li>
<li>下载Git，并安装</li>
</ul>
<h3 id="2-本地账号"><a href="#2-本地账号" class="headerlink" title="2. 本地账号"></a>2. 本地账号</h3><ul>
<li>这一步是方便以后使用git时，跳过账号信息验证</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">// &quot;&quot; 里填 GitHub 账号的用户名</span><br><span class="line"><span class="meta">$</span><span class="bash"> git config --global user.name <span class="string">&quot;&quot;</span></span></span><br><span class="line"></span><br><span class="line">// &quot;&quot; 里填 GitHub 账号的邮箱</span><br><span class="line"><span class="meta">$</span><span class="bash"> git config --global user.email <span class="string">&quot;&quot;</span></span></span><br><span class="line"></span><br><span class="line">// 查看本地的用户信息配置</span><br><span class="line"><span class="meta">$</span><span class="bash"> git config --list</span></span><br><span class="line">// 结果大概如下</span><br><span class="line">PS C:\Windows\System32&gt; git config --list</span><br><span class="line">diff.astextplain.textconv=astextplain</span><br><span class="line">filter.lfs.clean=git-lfs clean -- %f</span><br><span class="line">filter.lfs.smudge=git-lfs smudge -- %f</span><br><span class="line">filter.lfs.process=git-lfs filter-process</span><br><span class="line">filter.lfs.required=true</span><br><span class="line">http.sslbackend=openssl</span><br><span class="line">http.sslcainfo=E:/Git/Git/mingw64/ssl/certs/ca-bundle.crt</span><br><span class="line">core.autocrlf=true</span><br><span class="line">core.fscache=true</span><br><span class="line">core.symlinks=false</span><br><span class="line">pull.rebase=false</span><br><span class="line">credential.helper=manager</span><br><span class="line">user.email=752972182@qq.com</span><br><span class="line">user.name=FHangH</span><br></pre></td></tr></table></figure>


<h3 id="3-Public-SSH-Key"><a href="#3-Public-SSH-Key" class="headerlink" title="3 Public SSH Key"></a>3 Public SSH Key</h3><ul>
<li>在 Github 中添加一个 Public SSH key 同时在本地也要有 Public SSH Key 的相关文件</li>
<li>git 上传和下载过程中需要密钥的验证，以保证安全性</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">// 首先验证是否本地存在 SSH Key</span><br><span class="line"><span class="meta">$</span><span class="bash"> ssh -T git@github.com</span></span><br><span class="line"></span><br><span class="line">// 如果存在，大概结果如下（可以直接跳过生成本地 SSH Key 的步骤）</span><br><span class="line">PS C:\Windows\System32&gt; ssh -T git@github.com</span><br><span class="line">Hi FHangH! You&#x27;ve successfully authenticated, but GitHub does not provide shell access.</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">// 查看本地是否已经存在 Public SSH Key</span><br><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">cd</span> ~/.ssh</span></span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">// 查看文件列表</span><br><span class="line"><span class="meta">$</span><span class="bash"> ls</span></span><br><span class="line"></span><br><span class="line">// 此时两种情况，一种是什么都没有</span><br><span class="line">// 另一种是，差不多是存在以下文件，至少是有 id_rsa , id_rsa.pub 两个文件才行</span><br><span class="line"></span><br><span class="line">PS C:\Users\Admin\.ssh&gt; ls</span><br><span class="line">    Directory: C:\Users\Admin\.ssh</span><br><span class="line">Mode                 LastWriteTime         Length Name</span><br><span class="line">----                 -------------         ------ ----</span><br><span class="line">-a---           2021/2/17     9:18           2610 id_rsa</span><br><span class="line">-a---           2021/2/17     9:18            575 id_rsa.pub</span><br><span class="line">-a---           2021/2/19    16:05           1385 known_hosts</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">// 如果有，我们需要 id_rsa.pub 的内的key</span><br><span class="line"><span class="meta">$</span><span class="bash"> cat id_rsa.pub</span></span><br><span class="line"></span><br><span class="line">// 出现类似一下内容（全文复制，后面要用）</span><br><span class="line">PS C:\Users\Admin\.ssh&gt; cat .\id_rsa.pub</span><br><span class="line">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDdrPvLeNqhzEgVU8Ep/9LiDvGpooO6UD8Tq5DM4CJzfiS+I95KjwwhxpQ7Et0pgfMt6ikRBXE1phgxoaK+tArSLcAOr1k8CgHazzB7D2j2X6v4x0Xmescq4dzB+R+6dtYGWhn5qwFjn2KljjYGVwitwdjyuqIqzS3vEpJaIpzI8nOnbGPR42a6t9FmBg3KhYyrcT5Z7DJgQvF1RkXmjeCjtHOOWL7xdDjI8iRwF3Kkiz78ovv2jr8MB2unrgPTNQ56ZPSi34gAGIDgt59VVM14P6GRxvRvtCG644QOEH/4woOmADi28BD3Gkj2+1Z1tXTaj1WPOvyEorHAXVS4L9fDScvaRK3el1LKk1hX1/dq3+ozN+Jpm8KWVtfLGfKxmKgQSJFX6qH49FuCBcD0Rpk3WnJInqz5+HLUlGqQypf0oTjQFpa+vY83/Fa3WKpqAuJM136+3mxeZFv+YCJv7eql2FzNhUAMG6Zur4/Kx5uMP1QFl0y9JYmH7WebS9MMzmE= Admin@DESKTOP-EBFV026</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">// 如果没有，需要生成一个</span><br><span class="line">// &quot;&quot; 内填写 Github 账号的注册邮箱</span><br><span class="line"><span class="meta">$</span><span class="bash"> ssh-keygen -t rsa -C <span class="string">&quot;&quot;</span></span></span><br><span class="line"></span><br><span class="line">// 接下的步骤大概就是确认，填写密码之类的，回车键跳过（简单点）</span><br></pre></td></tr></table></figure>


<h3 id="4-Github添加Key"><a href="#4-Github添加Key" class="headerlink" title="4. Github添加Key"></a>4. Github添加Key</h3><p>需要在Github账户内，将本地生成的 SSH key 添加进去，Git上传或下载时，才不会出现错误</p>
<ul>
<li>进入Github用户主页</li>
<li>用户头像边上的倒三角</li>
<li>Settings 进入设置页面</li>
<li>在侧边栏内找到 SSH and GPG Keys</li>
<li>在SSH Keys 内找到 New SSH Key</li>
<li>跳转页面后，在Title页面里填写 Public SSH Key 名称（随意）</li>
<li>在Key的文本框内，粘贴进之前在 复制的 id_rsa.pub 文件的内容</li>
<li>Add SSH Key</li>
</ul>
<h3 id="5-Git仓库"><a href="#5-Git仓库" class="headerlink" title="5. Git仓库"></a>5. Git仓库</h3><ul>
<li>创建 Git 仓库 （这个也跳过，简单的创建一个公开的仓库）</li>
<li>创建后，可以简单记录一下 SSH 的链接，比如：<a href="mailto:&#103;&#105;&#116;&#64;&#x67;&#x69;&#x74;&#x68;&#x75;&#98;&#46;&#99;&#111;&#x6d;">&#103;&#105;&#116;&#64;&#x67;&#x69;&#x74;&#x68;&#x75;&#98;&#46;&#99;&#111;&#x6d;</a>:FHangH/FHangBlogCDN_02.git</li>
</ul>
<h3 id="6-上传本地到Git"><a href="#6-上传本地到Git" class="headerlink" title="6. 上传本地到Git"></a>6. 上传本地到Git</h3><ul>
<li>首先是进入要上传的项目文件夹内</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">// 初始化本地仓库</span><br><span class="line"><span class="meta">$</span><span class="bash"> git init</span></span><br><span class="line"></span><br><span class="line">// 将文件全部加入到缓存中</span><br><span class="line"><span class="meta">$</span><span class="bash"> git add .</span></span><br><span class="line">// 或者在 add 后面跟上指定的文件或某种类型的文件</span><br><span class="line"><span class="meta">$</span><span class="bash"> git add </span></span><br><span class="line"></span><br><span class="line">// 提交操作记录，&quot;&quot; 内随意填</span><br><span class="line"><span class="meta">$</span><span class="bash"> git commit -m <span class="string">&quot;&quot;</span></span></span><br><span class="line"></span><br><span class="line">// 远程添加到源中，也就是git仓库</span><br><span class="line"><span class="meta">$</span><span class="bash"> git remote add origin git@github.com:用户名/仓库名.git</span></span><br><span class="line">// 有时候出现失败情况，就用下面这条命令，然后再重复上面的命令</span><br><span class="line"><span class="meta">$</span><span class="bash"> git remote rm origin</span></span><br><span class="line"></span><br><span class="line">// 最后，将本地缓存中的文件上传的远程的git仓库中（有时候网络会抽风）</span><br><span class="line"><span class="meta">$</span><span class="bash"> git push origin master</span></span><br></pre></td></tr></table></figure>


<h3 id="7-从远程Git仓库拉到本地"><a href="#7-从远程Git仓库拉到本地" class="headerlink" title="7. 从远程Git仓库拉到本地"></a>7. 从远程Git仓库拉到本地</h3><ul>
<li>本地创建一个空的项目文件夹，在文件夹内进行</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">// 多种 clone 的方法</span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> http[s]://example.com/path/to/repo.git</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> http://git.oschina.net/yiibai/sample.git</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> ssh://example.com/path/to/repo.git</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> git://example.com/path/to/repo.git // 这个速度最快</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> /opt/git/project.git </span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> file:///opt/git/project.git</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> ftp[s]://example.com/path/to/repo.git</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> rsync://example.com/path/to/repo.git</span></span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">// 此处以 ssh 为例</span><br><span class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> git@github.com:FHangH/Cpp-Learn-AddressBook_Clion.git</span></span><br><span class="line"></span><br><span class="line">//运行结果（这样就 clone Git仓库到本地了）</span><br><span class="line">PS C:\Users\Admin\Desktop\Test&gt; git clone git@github.com:FHangH/Cpp-Learn-AddressBook_Clion.git</span><br><span class="line">Cloning into &#x27;Cpp-Learn-AddressBook_Clion&#x27;...</span><br><span class="line">remote: Enumerating objects: 65, done.</span><br><span class="line">Receiving objects:  10% (7/65) (65/65), done.</span><br><span class="line">remote: Compressing objects: 100% (55/55), done.</span><br><span class="line">remote: Total 65 (delta 7), reused 65 (delta 7), pack-reused 0</span><br><span class="line">Receiving objects: 100% (65/65), 739.90 KiB | 127.00 KiB/s, done.</span><br><span class="line">Resolving deltas: 100% (7/7), done.</span><br></pre></td></tr></table></figure>


<h3 id="8-gitignore文件"><a href="#8-gitignore文件" class="headerlink" title="8. gitignore文件"></a>8. gitignore文件</h3><ul>
<li>用来上传本地项目到远程仓库时，过滤掉一些不需要上传的文件</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">// 生成 .gitignore 文件</span><br><span class="line"><span class="meta">$</span><span class="bash"> touch .gitignore</span></span><br><span class="line"></span><br><span class="line">// powershell 里生成 .gitignore 的方法</span><br><span class="line"><span class="meta">$</span><span class="bash"> new-item .gitignore</span></span><br></pre></td></tr></table></figure>
<ul>
<li><p>提供一个现成的 .gitignore 文件的开源库链接</p>
</li>
<li><p>[gitignore]: <a target="_blank" rel="noopener" href="https://github.com/FHangH/gitignore">https://github.com/FHangH/gitignore</a></p>
</li>
<li><p>使用方法：</p>
<ol>
<li>确定自己上传的项目类型</li>
<li>在上述开源链接中找到对应项目类型的 .gitignore 文件</li>
<li>复制里面的内容</li>
<li>粘贴到自己项目中创建的 .gitignore 文件中，保存</li>
</ol>
</li>
</ul>
<h5 id="8-1-个人常用的-gitignore-文件"><a href="#8-1-个人常用的-gitignore-文件" class="headerlink" title="8.1 个人常用的 .gitignore 文件"></a>8.1 个人常用的 .gitignore 文件</h5><h6 id="8-1-1-UnrealEnigne-gitignore"><a href="#8-1-1-UnrealEnigne-gitignore" class="headerlink" title="8.1.1 UnrealEnigne.gitignore"></a>8.1.1 <em>UnrealEnigne.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br></pre></td><td class="code"><pre><span class="line"># Visual Studio 2015 user specific files</span><br><span class="line">.vs&#x2F;</span><br><span class="line"></span><br><span class="line"># Compiled Object files</span><br><span class="line">*.slo</span><br><span class="line">*.lo</span><br><span class="line">*.o</span><br><span class="line">*.obj</span><br><span class="line"></span><br><span class="line"># Precompiled Headers</span><br><span class="line">*.gch</span><br><span class="line">*.pch</span><br><span class="line"></span><br><span class="line"># Compiled Dynamic libraries</span><br><span class="line">*.so</span><br><span class="line">*.dylib</span><br><span class="line">*.dll</span><br><span class="line"></span><br><span class="line"># Fortran module files</span><br><span class="line">*.mod</span><br><span class="line"></span><br><span class="line"># Compiled Static libraries</span><br><span class="line">*.lai</span><br><span class="line">*.la</span><br><span class="line">*.a</span><br><span class="line">*.lib</span><br><span class="line"></span><br><span class="line"># Executables</span><br><span class="line">*.exe</span><br><span class="line">*.out</span><br><span class="line">*.app</span><br><span class="line">*.ipa</span><br><span class="line"></span><br><span class="line"># These project files can be generated by the engine</span><br><span class="line">*.xcodeproj</span><br><span class="line">*.xcworkspace</span><br><span class="line">*.sln</span><br><span class="line">*.suo</span><br><span class="line">*.opensdf</span><br><span class="line">*.sdf</span><br><span class="line">*.VC.db</span><br><span class="line">*.VC.opendb</span><br><span class="line"></span><br><span class="line"># Precompiled Assets</span><br><span class="line">SourceArt&#x2F;**&#x2F;*.png</span><br><span class="line">SourceArt&#x2F;**&#x2F;*.tga</span><br><span class="line"></span><br><span class="line"># Binary Files</span><br><span class="line">Binaries&#x2F;*</span><br><span class="line">Plugins&#x2F;*&#x2F;Binaries&#x2F;*</span><br><span class="line"></span><br><span class="line"># Builds</span><br><span class="line">Build&#x2F;*</span><br><span class="line"></span><br><span class="line"># Whitelist PakBlacklist-&lt;BuildConfiguration&gt;.txt files</span><br><span class="line">!Build&#x2F;*&#x2F;</span><br><span class="line">Build&#x2F;*&#x2F;**</span><br><span class="line">!Build&#x2F;*&#x2F;PakBlacklist*.txt</span><br><span class="line"></span><br><span class="line"># Don&#39;t ignore icon files in Build</span><br><span class="line">!Build&#x2F;**&#x2F;*.ico</span><br><span class="line"></span><br><span class="line"># Built data for maps</span><br><span class="line">*_BuiltData.uasset</span><br><span class="line"></span><br><span class="line"># Configuration files generated by the Editor</span><br><span class="line">Saved&#x2F;*</span><br><span class="line"></span><br><span class="line"># Compiled source files for the engine to use</span><br><span class="line">Intermediate&#x2F;*</span><br><span class="line">Plugins&#x2F;*&#x2F;Intermediate&#x2F;*</span><br><span class="line"></span><br><span class="line"># Cache files for the editor to use</span><br><span class="line">DerivedDataCache&#x2F;*</span><br></pre></td></tr></table></figure>


<h6 id="8-1-2-Unity-gitignore"><a href="#8-1-2-Unity-gitignore" class="headerlink" title="8.1.2 Unity.gitignore"></a>8.1.2 <em>Unity.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"># This .gitignore file should be placed at the root of your Unity project directory</span><br><span class="line">#</span><br><span class="line"># Get latest from https:&#x2F;&#x2F;github.com&#x2F;github&#x2F;gitignore&#x2F;blob&#x2F;master&#x2F;Unity.gitignore</span><br><span class="line">#</span><br><span class="line">&#x2F;[Ll]ibrary&#x2F;</span><br><span class="line">&#x2F;[Tt]emp&#x2F;</span><br><span class="line">&#x2F;[Oo]bj&#x2F;</span><br><span class="line">&#x2F;[Bb]uild&#x2F;</span><br><span class="line">&#x2F;[Bb]uilds&#x2F;</span><br><span class="line">&#x2F;[Ll]ogs&#x2F;</span><br><span class="line">&#x2F;[Uu]ser[Ss]ettings&#x2F;</span><br><span class="line"></span><br><span class="line"># MemoryCaptures can get excessive in size.</span><br><span class="line"># They also could contain extremely sensitive data</span><br><span class="line">&#x2F;[Mm]emoryCaptures&#x2F;</span><br><span class="line"></span><br><span class="line"># Asset meta data should only be ignored when the corresponding asset is also ignored</span><br><span class="line">!&#x2F;[Aa]ssets&#x2F;**&#x2F;*.meta</span><br><span class="line"></span><br><span class="line"># Uncomment this line if you wish to ignore the asset store tools plugin</span><br><span class="line"># &#x2F;[Aa]ssets&#x2F;AssetStoreTools*</span><br><span class="line"></span><br><span class="line"># Autogenerated Jetbrains Rider plugin</span><br><span class="line">&#x2F;[Aa]ssets&#x2F;Plugins&#x2F;Editor&#x2F;JetBrains*</span><br><span class="line"></span><br><span class="line"># Visual Studio cache directory</span><br><span class="line">.vs&#x2F;</span><br><span class="line"></span><br><span class="line"># Gradle cache directory</span><br><span class="line">.gradle&#x2F;</span><br><span class="line"></span><br><span class="line"># Autogenerated VS&#x2F;MD&#x2F;Consulo solution and project files</span><br><span class="line">ExportedObj&#x2F;</span><br><span class="line">.consulo&#x2F;</span><br><span class="line">*.csproj</span><br><span class="line">*.unityproj</span><br><span class="line">*.sln</span><br><span class="line">*.suo</span><br><span class="line">*.tmp</span><br><span class="line">*.user</span><br><span class="line">*.userprefs</span><br><span class="line">*.pidb</span><br><span class="line">*.booproj</span><br><span class="line">*.svd</span><br><span class="line">*.pdb</span><br><span class="line">*.mdb</span><br><span class="line">*.opendb</span><br><span class="line">*.VC.db</span><br><span class="line"></span><br><span class="line"># Unity3D generated meta files</span><br><span class="line">*.pidb.meta</span><br><span class="line">*.pdb.meta</span><br><span class="line">*.mdb.meta</span><br><span class="line"></span><br><span class="line"># Unity3D generated file on crash reports</span><br><span class="line">sysinfo.txt</span><br><span class="line"></span><br><span class="line"># Builds</span><br><span class="line">*.apk</span><br><span class="line">*.aab</span><br><span class="line">*.unitypackage</span><br><span class="line"></span><br><span class="line"># Crashlytics generated file</span><br><span class="line">crashlytics-build.properties</span><br><span class="line"></span><br><span class="line"># Packed Addressables</span><br><span class="line">&#x2F;[Aa]ssets&#x2F;[Aa]ddressable[Aa]ssets[Dd]ata&#x2F;*&#x2F;*.bin*</span><br><span class="line"></span><br><span class="line"># Temporary auto-generated Android Assets</span><br><span class="line">&#x2F;[Aa]ssets&#x2F;[Ss]treamingAssets&#x2F;aa.meta</span><br><span class="line">&#x2F;[Aa]ssets&#x2F;[Ss]treamingAssets&#x2F;aa&#x2F;*</span><br></pre></td></tr></table></figure>


<h6 id="8-1-3-VisualStudio-gitignore"><a href="#8-1-3-VisualStudio-gitignore" class="headerlink" title="8.1.3 VisualStudio.gitignore"></a>8.1.3 <em>VisualStudio.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br></pre></td><td class="code"><pre><span class="line">## Ignore Visual Studio temporary files, build results, and</span><br><span class="line">## files generated by popular Visual Studio add-ons.</span><br><span class="line">##</span><br><span class="line">## Get latest from https:&#x2F;&#x2F;github.com&#x2F;github&#x2F;gitignore&#x2F;blob&#x2F;master&#x2F;VisualStudio.gitignore</span><br><span class="line"></span><br><span class="line"># User-specific files</span><br><span class="line">*.rsuser</span><br><span class="line">*.suo</span><br><span class="line">*.user</span><br><span class="line">*.userosscache</span><br><span class="line">*.sln.docstates</span><br><span class="line"></span><br><span class="line"># User-specific files (MonoDevelop&#x2F;Xamarin Studio)</span><br><span class="line">*.userprefs</span><br><span class="line"></span><br><span class="line"># Mono auto generated files</span><br><span class="line">mono_crash.*</span><br><span class="line"></span><br><span class="line"># Build results</span><br><span class="line">[Dd]ebug&#x2F;</span><br><span class="line">[Dd]ebugPublic&#x2F;</span><br><span class="line">[Rr]elease&#x2F;</span><br><span class="line">[Rr]eleases&#x2F;</span><br><span class="line">x64&#x2F;</span><br><span class="line">x86&#x2F;</span><br><span class="line">[Ww][Ii][Nn]32&#x2F;</span><br><span class="line">[Aa][Rr][Mm]&#x2F;</span><br><span class="line">[Aa][Rr][Mm]64&#x2F;</span><br><span class="line">bld&#x2F;</span><br><span class="line">[Bb]in&#x2F;</span><br><span class="line">[Oo]bj&#x2F;</span><br><span class="line">[Ll]og&#x2F;</span><br><span class="line">[Ll]ogs&#x2F;</span><br><span class="line"></span><br><span class="line"># Visual Studio 2015&#x2F;2017 cache&#x2F;options directory</span><br><span class="line">.vs&#x2F;</span><br><span class="line"># Uncomment if you have tasks that create the project&#39;s static files in wwwroot</span><br><span class="line">#wwwroot&#x2F;</span><br><span class="line"></span><br><span class="line"># Visual Studio 2017 auto generated files</span><br><span class="line">Generated\ Files&#x2F;</span><br><span class="line"></span><br><span class="line"># MSTest test Results</span><br><span class="line">[Tt]est[Rr]esult*&#x2F;</span><br><span class="line">[Bb]uild[Ll]og.*</span><br><span class="line"></span><br><span class="line"># NUnit</span><br><span class="line">*.VisualState.xml</span><br><span class="line">TestResult.xml</span><br><span class="line">nunit-*.xml</span><br><span class="line"></span><br><span class="line"># Build Results of an ATL Project</span><br><span class="line">[Dd]ebugPS&#x2F;</span><br><span class="line">[Rr]eleasePS&#x2F;</span><br><span class="line">dlldata.c</span><br><span class="line"></span><br><span class="line"># Benchmark Results</span><br><span class="line">BenchmarkDotNet.Artifacts&#x2F;</span><br><span class="line"></span><br><span class="line"># .NET Core</span><br><span class="line">project.lock.json</span><br><span class="line">project.fragment.lock.json</span><br><span class="line">artifacts&#x2F;</span><br><span class="line"></span><br><span class="line"># ASP.NET Scaffolding</span><br><span class="line">ScaffoldingReadMe.txt</span><br><span class="line"></span><br><span class="line"># StyleCop</span><br><span class="line">StyleCopReport.xml</span><br><span class="line"></span><br><span class="line"># Files built by Visual Studio</span><br><span class="line">*_i.c</span><br><span class="line">*_p.c</span><br><span class="line">*_h.h</span><br><span class="line">*.ilk</span><br><span class="line">*.meta</span><br><span class="line">*.obj</span><br><span class="line">*.iobj</span><br><span class="line">*.pch</span><br><span class="line">*.pdb</span><br><span class="line">*.ipdb</span><br><span class="line">*.pgc</span><br><span class="line">*.pgd</span><br><span class="line">*.rsp</span><br><span class="line">*.sbr</span><br><span class="line">*.tlb</span><br><span class="line">*.tli</span><br><span class="line">*.tlh</span><br><span class="line">*.tmp</span><br><span class="line">*.tmp_proj</span><br><span class="line">*_wpftmp.csproj</span><br><span class="line">*.log</span><br><span class="line">*.vspscc</span><br><span class="line">*.vssscc</span><br><span class="line">.builds</span><br><span class="line">*.pidb</span><br><span class="line">*.svclog</span><br><span class="line">*.scc</span><br><span class="line"></span><br><span class="line"># Chutzpah Test files</span><br><span class="line">_Chutzpah*</span><br><span class="line"></span><br><span class="line"># Visual C++ cache files</span><br><span class="line">ipch&#x2F;</span><br><span class="line">*.aps</span><br><span class="line">*.ncb</span><br><span class="line">*.opendb</span><br><span class="line">*.opensdf</span><br><span class="line">*.sdf</span><br><span class="line">*.cachefile</span><br><span class="line">*.VC.db</span><br><span class="line">*.VC.VC.opendb</span><br><span class="line"></span><br><span class="line"># Visual Studio profiler</span><br><span class="line">*.psess</span><br><span class="line">*.vsp</span><br><span class="line">*.vspx</span><br><span class="line">*.sap</span><br><span class="line"></span><br><span class="line"># Visual Studio Trace Files</span><br><span class="line">*.e2e</span><br><span class="line"></span><br><span class="line"># TFS 2012 Local Workspace</span><br><span class="line">$tf&#x2F;</span><br><span class="line"></span><br><span class="line"># Guidance Automation Toolkit</span><br><span class="line">*.gpState</span><br><span class="line"></span><br><span class="line"># ReSharper is a .NET coding add-in</span><br><span class="line">_ReSharper*&#x2F;</span><br><span class="line">*.[Rr]e[Ss]harper</span><br><span class="line">*.DotSettings.user</span><br><span class="line"></span><br><span class="line"># TeamCity is a build add-in</span><br><span class="line">_TeamCity*</span><br><span class="line"></span><br><span class="line"># DotCover is a Code Coverage Tool</span><br><span class="line">*.dotCover</span><br><span class="line"></span><br><span class="line"># AxoCover is a Code Coverage Tool</span><br><span class="line">.axoCover&#x2F;*</span><br><span class="line">!.axoCover&#x2F;settings.json</span><br><span class="line"></span><br><span class="line"># Coverlet is a free, cross platform Code Coverage Tool</span><br><span class="line">coverage*[.json, .xml, .info]</span><br><span class="line"></span><br><span class="line"># Visual Studio code coverage results</span><br><span class="line">*.coverage</span><br><span class="line">*.coveragexml</span><br><span class="line"></span><br><span class="line"># NCrunch</span><br><span class="line">_NCrunch_*</span><br><span class="line">.*crunch*.local.xml</span><br><span class="line">nCrunchTemp_*</span><br><span class="line"></span><br><span class="line"># MightyMoose</span><br><span class="line">*.mm.*</span><br><span class="line">AutoTest.Net&#x2F;</span><br><span class="line"></span><br><span class="line"># Web workbench (sass)</span><br><span class="line">.sass-cache&#x2F;</span><br><span class="line"></span><br><span class="line"># Installshield output folder</span><br><span class="line">[Ee]xpress&#x2F;</span><br><span class="line"></span><br><span class="line"># DocProject is a documentation generator add-in</span><br><span class="line">DocProject&#x2F;buildhelp&#x2F;</span><br><span class="line">DocProject&#x2F;Help&#x2F;*.HxT</span><br><span class="line">DocProject&#x2F;Help&#x2F;*.HxC</span><br><span class="line">DocProject&#x2F;Help&#x2F;*.hhc</span><br><span class="line">DocProject&#x2F;Help&#x2F;*.hhk</span><br><span class="line">DocProject&#x2F;Help&#x2F;*.hhp</span><br><span class="line">DocProject&#x2F;Help&#x2F;Html2</span><br><span class="line">DocProject&#x2F;Help&#x2F;html</span><br><span class="line"></span><br><span class="line"># Click-Once directory</span><br><span class="line">publish&#x2F;</span><br><span class="line"></span><br><span class="line"># Publish Web Output</span><br><span class="line">*.[Pp]ublish.xml</span><br><span class="line">*.azurePubxml</span><br><span class="line"># Note: Comment the next line if you want to checkin your web deploy settings,</span><br><span class="line"># but database connection strings (with potential passwords) will be unencrypted</span><br><span class="line">*.pubxml</span><br><span class="line">*.publishproj</span><br><span class="line"></span><br><span class="line"># Microsoft Azure Web App publish settings. Comment the next line if you want to</span><br><span class="line"># checkin your Azure Web App publish settings, but sensitive information contained</span><br><span class="line"># in these scripts will be unencrypted</span><br><span class="line">PublishScripts&#x2F;</span><br><span class="line"></span><br><span class="line"># NuGet Packages</span><br><span class="line">*.nupkg</span><br><span class="line"># NuGet Symbol Packages</span><br><span class="line">*.snupkg</span><br><span class="line"># The packages folder can be ignored because of Package Restore</span><br><span class="line">**&#x2F;[Pp]ackages&#x2F;*</span><br><span class="line"># except build&#x2F;, which is used as an MSBuild target.</span><br><span class="line">!**&#x2F;[Pp]ackages&#x2F;build&#x2F;</span><br><span class="line"># Uncomment if necessary however generally it will be regenerated when needed</span><br><span class="line">#!**&#x2F;[Pp]ackages&#x2F;repositories.config</span><br><span class="line"># NuGet v3&#39;s project.json files produces more ignorable files</span><br><span class="line">*.nuget.props</span><br><span class="line">*.nuget.targets</span><br><span class="line"></span><br><span class="line"># Microsoft Azure Build Output</span><br><span class="line">csx&#x2F;</span><br><span class="line">*.build.csdef</span><br><span class="line"></span><br><span class="line"># Microsoft Azure Emulator</span><br><span class="line">ecf&#x2F;</span><br><span class="line">rcf&#x2F;</span><br><span class="line"></span><br><span class="line"># Windows Store app package directories and files</span><br><span class="line">AppPackages&#x2F;</span><br><span class="line">BundleArtifacts&#x2F;</span><br><span class="line">Package.StoreAssociation.xml</span><br><span class="line">_pkginfo.txt</span><br><span class="line">*.appx</span><br><span class="line">*.appxbundle</span><br><span class="line">*.appxupload</span><br><span class="line"></span><br><span class="line"># Visual Studio cache files</span><br><span class="line"># files ending in .cache can be ignored</span><br><span class="line">*.[Cc]ache</span><br><span class="line"># but keep track of directories ending in .cache</span><br><span class="line">!?*.[Cc]ache&#x2F;</span><br><span class="line"></span><br><span class="line"># Others</span><br><span class="line">ClientBin&#x2F;</span><br><span class="line">~$*</span><br><span class="line">*~</span><br><span class="line">*.dbmdl</span><br><span class="line">*.dbproj.schemaview</span><br><span class="line">*.jfm</span><br><span class="line">*.pfx</span><br><span class="line">*.publishsettings</span><br><span class="line">orleans.codegen.cs</span><br><span class="line"></span><br><span class="line"># Including strong name files can present a security risk</span><br><span class="line"># (https:&#x2F;&#x2F;github.com&#x2F;github&#x2F;gitignore&#x2F;pull&#x2F;2483#issue-259490424)</span><br><span class="line">#*.snk</span><br><span class="line"></span><br><span class="line"># Since there are multiple workflows, uncomment next line to ignore bower_components</span><br><span class="line"># (https:&#x2F;&#x2F;github.com&#x2F;github&#x2F;gitignore&#x2F;pull&#x2F;1529#issuecomment-104372622)</span><br><span class="line">#bower_components&#x2F;</span><br><span class="line"></span><br><span class="line"># RIA&#x2F;Silverlight projects</span><br><span class="line">Generated_Code&#x2F;</span><br><span class="line"></span><br><span class="line"># Backup &amp; report files from converting an old project file</span><br><span class="line"># to a newer Visual Studio version. Backup files are not needed,</span><br><span class="line"># because we have git ;-)</span><br><span class="line">_UpgradeReport_Files&#x2F;</span><br><span class="line">Backup*&#x2F;</span><br><span class="line">UpgradeLog*.XML</span><br><span class="line">UpgradeLog*.htm</span><br><span class="line">ServiceFabricBackup&#x2F;</span><br><span class="line">*.rptproj.bak</span><br><span class="line"></span><br><span class="line"># SQL Server files</span><br><span class="line">*.mdf</span><br><span class="line">*.ldf</span><br><span class="line">*.ndf</span><br><span class="line"></span><br><span class="line"># Business Intelligence projects</span><br><span class="line">*.rdl.data</span><br><span class="line">*.bim.layout</span><br><span class="line">*.bim_*.settings</span><br><span class="line">*.rptproj.rsuser</span><br><span class="line">*- [Bb]ackup.rdl</span><br><span class="line">*- [Bb]ackup ([0-9]).rdl</span><br><span class="line">*- [Bb]ackup ([0-9][0-9]).rdl</span><br><span class="line"></span><br><span class="line"># Microsoft Fakes</span><br><span class="line">FakesAssemblies&#x2F;</span><br><span class="line"></span><br><span class="line"># GhostDoc plugin setting file</span><br><span class="line">*.GhostDoc.xml</span><br><span class="line"></span><br><span class="line"># Node.js Tools for Visual Studio</span><br><span class="line">.ntvs_analysis.dat</span><br><span class="line">node_modules&#x2F;</span><br><span class="line"></span><br><span class="line"># Visual Studio 6 build log</span><br><span class="line">*.plg</span><br><span class="line"></span><br><span class="line"># Visual Studio 6 workspace options file</span><br><span class="line">*.opt</span><br><span class="line"></span><br><span class="line"># Visual Studio 6 auto-generated workspace file (contains which files were open etc.)</span><br><span class="line">*.vbw</span><br><span class="line"></span><br><span class="line"># Visual Studio LightSwitch build output</span><br><span class="line">**&#x2F;*.HTMLClient&#x2F;GeneratedArtifacts</span><br><span class="line">**&#x2F;*.DesktopClient&#x2F;GeneratedArtifacts</span><br><span class="line">**&#x2F;*.DesktopClient&#x2F;ModelManifest.xml</span><br><span class="line">**&#x2F;*.Server&#x2F;GeneratedArtifacts</span><br><span class="line">**&#x2F;*.Server&#x2F;ModelManifest.xml</span><br><span class="line">_Pvt_Extensions</span><br><span class="line"></span><br><span class="line"># Paket dependency manager</span><br><span class="line">.paket&#x2F;paket.exe</span><br><span class="line">paket-files&#x2F;</span><br><span class="line"></span><br><span class="line"># FAKE - F# Make</span><br><span class="line">.fake&#x2F;</span><br><span class="line"></span><br><span class="line"># CodeRush personal settings</span><br><span class="line">.cr&#x2F;personal</span><br><span class="line"></span><br><span class="line"># Python Tools for Visual Studio (PTVS)</span><br><span class="line">__pycache__&#x2F;</span><br><span class="line">*.pyc</span><br><span class="line"></span><br><span class="line"># Cake - Uncomment if you are using it</span><br><span class="line"># tools&#x2F;**</span><br><span class="line"># !tools&#x2F;packages.config</span><br><span class="line"></span><br><span class="line"># Tabs Studio</span><br><span class="line">*.tss</span><br><span class="line"></span><br><span class="line"># Telerik&#39;s JustMock configuration file</span><br><span class="line">*.jmconfig</span><br><span class="line"></span><br><span class="line"># BizTalk build output</span><br><span class="line">*.btp.cs</span><br><span class="line">*.btm.cs</span><br><span class="line">*.odx.cs</span><br><span class="line">*.xsd.cs</span><br><span class="line"></span><br><span class="line"># OpenCover UI analysis results</span><br><span class="line">OpenCover&#x2F;</span><br><span class="line"></span><br><span class="line"># Azure Stream Analytics local run output</span><br><span class="line">ASALocalRun&#x2F;</span><br><span class="line"></span><br><span class="line"># MSBuild Binary and Structured Log</span><br><span class="line">*.binlog</span><br><span class="line"></span><br><span class="line"># NVidia Nsight GPU debugger configuration file</span><br><span class="line">*.nvuser</span><br><span class="line"></span><br><span class="line"># MFractors (Xamarin productivity tool) working folder</span><br><span class="line">.mfractor&#x2F;</span><br><span class="line"></span><br><span class="line"># Local History for Visual Studio</span><br><span class="line">.localhistory&#x2F;</span><br><span class="line"></span><br><span class="line"># BeatPulse healthcheck temp database</span><br><span class="line">healthchecksdb</span><br><span class="line"></span><br><span class="line"># Backup folder for Package Reference Convert tool in Visual Studio 2017</span><br><span class="line">MigrationBackup&#x2F;</span><br><span class="line"></span><br><span class="line"># Ionide (cross platform F# VS Code tools) working folder</span><br><span class="line">.ionide&#x2F;</span><br><span class="line"></span><br><span class="line"># Fody - auto-generated XML schema</span><br><span class="line">FodyWeavers.xsd</span><br></pre></td></tr></table></figure>


<h6 id="8-1-4-C-gitignore"><a href="#8-1-4-C-gitignore" class="headerlink" title="8.1.4 C++.gitignore"></a>8.1.4 <em>C++.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"># Prerequisites</span><br><span class="line">*.d</span><br><span class="line"></span><br><span class="line"># Compiled Object files</span><br><span class="line">*.slo</span><br><span class="line">*.lo</span><br><span class="line">*.o</span><br><span class="line">*.obj</span><br><span class="line"></span><br><span class="line"># Precompiled Headers</span><br><span class="line">*.gch</span><br><span class="line">*.pch</span><br><span class="line"></span><br><span class="line"># Compiled Dynamic libraries</span><br><span class="line">*.so</span><br><span class="line">*.dylib</span><br><span class="line">*.dll</span><br><span class="line"></span><br><span class="line"># Fortran module files</span><br><span class="line">*.mod</span><br><span class="line">*.smod</span><br><span class="line"></span><br><span class="line"># Compiled Static libraries</span><br><span class="line">*.lai</span><br><span class="line">*.la</span><br><span class="line">*.a</span><br><span class="line">*.lib</span><br><span class="line"></span><br><span class="line"># Executables</span><br><span class="line">*.exe</span><br><span class="line">*.out</span><br><span class="line">*.app</span><br></pre></td></tr></table></figure>


<h6 id="8-1-5-C-gitignore"><a href="#8-1-5-C-gitignore" class="headerlink" title="8.1.5 C.gitignore"></a>8.1.5 <em>C.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line"># Prerequisites</span><br><span class="line">*.d</span><br><span class="line"></span><br><span class="line"># Object files</span><br><span class="line">*.o</span><br><span class="line">*.ko</span><br><span class="line">*.obj</span><br><span class="line">*.elf</span><br><span class="line"></span><br><span class="line"># Linker output</span><br><span class="line">*.ilk</span><br><span class="line">*.map</span><br><span class="line">*.exp</span><br><span class="line"></span><br><span class="line"># Precompiled Headers</span><br><span class="line">*.gch</span><br><span class="line">*.pch</span><br><span class="line"></span><br><span class="line"># Libraries</span><br><span class="line">*.lib</span><br><span class="line">*.a</span><br><span class="line">*.la</span><br><span class="line">*.lo</span><br><span class="line"></span><br><span class="line"># Shared objects (inc. Windows DLLs)</span><br><span class="line">*.dll</span><br><span class="line">*.so</span><br><span class="line">*.so.*</span><br><span class="line">*.dylib</span><br><span class="line"></span><br><span class="line"># Executables</span><br><span class="line">*.exe</span><br><span class="line">*.out</span><br><span class="line">*.app</span><br><span class="line">*.i*86</span><br><span class="line">*.x86_64</span><br><span class="line">*.hex</span><br><span class="line"></span><br><span class="line"># Debug files</span><br><span class="line">*.dSYM&#x2F;</span><br><span class="line">*.su</span><br><span class="line">*.idb</span><br><span class="line">*.pdb</span><br><span class="line"></span><br><span class="line"># Kernel Module Compile Results</span><br><span class="line">*.mod*</span><br><span class="line">*.cmd</span><br><span class="line">.tmp_versions&#x2F;</span><br><span class="line">modules.order</span><br><span class="line">Module.symvers</span><br><span class="line">Mkfile.old</span><br><span class="line">dkms.conf</span><br></pre></td></tr></table></figure>


<h6 id="8-1-6-CMake-gitignore"><a href="#8-1-6-CMake-gitignore" class="headerlink" title="8.1.6 CMake.gitignore"></a>8.1.6 <em>CMake.gitignore</em></h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">CMakeLists.txt.user</span><br><span class="line">CMakeCache.txt</span><br><span class="line">CMakeFiles</span><br><span class="line">CMakeScripts</span><br><span class="line">Testing</span><br><span class="line">Makefile</span><br><span class="line">cmake_install.cmake</span><br><span class="line">install_manifest.txt</span><br><span class="line">compile_commands.json</span><br><span class="line">CTestTestfile.cmake</span><br><span class="line">_deps</span><br></pre></td></tr></table></figure>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">FHang</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://fhangh.gitee.io/article/2bb94fc8.html">https://fhangh.gitee.io/article/2bb94fc8.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://fhangh.gitee.io" target="_blank">Element</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/fhangh/tags/Git/">Git</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_12.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/fhangh/article/80740681.html"><img class="prev-cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_10.jpg" onerror="onerror=null;src='/fhangh/img/404.jpg'"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">UE4初始设置及个人使用崩溃记录</div></div></a></div><div class="next-post pull-right"><a href="/fhangh/article/9ec06885.html"><img class="next-cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_11.jpg" onerror="onerror=null;src='/fhangh/img/404.jpg'"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">C语言基础</div></div></a></div></nav></div><div class="aside_content" id="aside_content"><div class="card-widget card-info"><div class="card-content"><div class="card-info-avatar is-center"><img class="avatar-img" data-lazy-src="/fhangh/img/fh.png" onerror="this.onerror=null;this.src='/fhangh/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">FHang</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/fhangh/archives/"><div class="headline">文章</div><div class="length-num">26</div></a></div><div class="card-info-data-item is-center"><a href="/fhangh/tags/"><div class="headline">标签</div><div class="length-num">10</div></a></div><div class="card-info-data-item is-center"><a href="/fhangh/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/FHangH"><i class="fab fa-github"></i><span>Link To</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/FHangH" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:752972182@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div></div><div class="card-widget card-announcement"><div class="card-content"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">个人学习笔记</div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="card-content"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Git%E4%B8%AA%E4%BA%BA%E4%BD%BF%E7%94%A8"><span class="toc-number">1.</span> <span class="toc-text">Git个人使用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="toc-number">1.0.1.</span> <span class="toc-text">1. 准备工作</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-%E6%9C%AC%E5%9C%B0%E8%B4%A6%E5%8F%B7"><span class="toc-number">1.0.2.</span> <span class="toc-text">2. 本地账号</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-Public-SSH-Key"><span class="toc-number">1.0.3.</span> <span class="toc-text">3 Public SSH Key</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-Github%E6%B7%BB%E5%8A%A0Key"><span class="toc-number">1.0.4.</span> <span class="toc-text">4. Github添加Key</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-Git%E4%BB%93%E5%BA%93"><span class="toc-number">1.0.5.</span> <span class="toc-text">5. Git仓库</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-%E4%B8%8A%E4%BC%A0%E6%9C%AC%E5%9C%B0%E5%88%B0Git"><span class="toc-number">1.0.6.</span> <span class="toc-text">6. 上传本地到Git</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-%E4%BB%8E%E8%BF%9C%E7%A8%8BGit%E4%BB%93%E5%BA%93%E6%8B%89%E5%88%B0%E6%9C%AC%E5%9C%B0"><span class="toc-number">1.0.7.</span> <span class="toc-text">7. 从远程Git仓库拉到本地</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-gitignore%E6%96%87%E4%BB%B6"><span class="toc-number">1.0.8.</span> <span class="toc-text">8. gitignore文件</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#8-1-%E4%B8%AA%E4%BA%BA%E5%B8%B8%E7%94%A8%E7%9A%84-gitignore-%E6%96%87%E4%BB%B6"><span class="toc-number">1.0.8.0.1.</span> <span class="toc-text">8.1 个人常用的 .gitignore 文件</span></a><ol class="toc-child"><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-1-UnrealEnigne-gitignore"><span class="toc-number">1.0.8.0.1.1.</span> <span class="toc-text">8.1.1 UnrealEnigne.gitignore</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-2-Unity-gitignore"><span class="toc-number">1.0.8.0.1.2.</span> <span class="toc-text">8.1.2 Unity.gitignore</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-3-VisualStudio-gitignore"><span class="toc-number">1.0.8.0.1.3.</span> <span class="toc-text">8.1.3 VisualStudio.gitignore</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-4-C-gitignore"><span class="toc-number">1.0.8.0.1.4.</span> <span class="toc-text">8.1.4 C++.gitignore</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-5-C-gitignore"><span class="toc-number">1.0.8.0.1.5.</span> <span class="toc-text">8.1.5 C.gitignore</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#8-1-6-CMake-gitignore"><span class="toc-number">1.0.8.0.1.6.</span> <span class="toc-text">8.1.6 CMake.gitignore</span></a></li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></div></div></div><div class="card-widget card-recent-post"><div class="card-content"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/3fadb38f.html" title="UE4联网和多人游戏"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_27.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4联网和多人游戏"/></a><div class="content"><a class="title" href="/fhangh/article/3fadb38f.html" title="UE4联网和多人游戏">UE4联网和多人游戏</a><time datetime="2022-05-26T14:04:45.432Z" title="发表于 2022-05-26 22:04:45">2022-05-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/7dd18469.html" title="UE4 RPC"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_26.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 RPC"/></a><div class="content"><a class="title" href="/fhangh/article/7dd18469.html" title="UE4 RPC">UE4 RPC</a><time datetime="2022-05-19T04:30:00.826Z" title="发表于 2022-05-19 12:30:00">2022-05-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/cb9854b2.html" title="UE4 MySQL插件使用"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_25.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 MySQL插件使用"/></a><div class="content"><a class="title" href="/fhangh/article/cb9854b2.html" title="UE4 MySQL插件使用">UE4 MySQL插件使用</a><time datetime="2022-03-27T06:49:30.840Z" title="发表于 2022-03-27 14:49:30">2022-03-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/605bd1ac.html" title="UE4 MySQL插件开发"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_24.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 MySQL插件开发"/></a><div class="content"><a class="title" href="/fhangh/article/605bd1ac.html" title="UE4 MySQL插件开发">UE4 MySQL插件开发</a><time datetime="2022-03-26T07:56:25.807Z" title="发表于 2022-03-26 15:56:25">2022-03-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/f7ede91d.html" title="Java基础"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_19.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="Java基础"/></a><div class="content"><a class="title" href="/fhangh/article/f7ede91d.html" title="Java基础">Java基础</a><time datetime="2021-12-12T07:47:44.788Z" title="发表于 2021-12-12 15:47:44">2021-12-12</time></div></div></div></div></div></div></div></main><footer id="footer" style="background-image: url(https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img/postImg_12.jpg)"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By FHang</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="/fhangh/js/utils.js"></script><script src="/fhangh/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/fhangh/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> {preloader.endLoading()})</script><div class="js-pjax"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="true"></script></div></body></html>